import pygame
from blocktype import BlockType


class ResManager:
    def __init__(self):
        self.image_dict = {}
        self.load_images()

        self.board_bg = pygame.image.load("img/starsky.png")

    def load_images(self):
        """
        "L": "blue.png",
        "S": "red.png",
        "Z": "yellow.png",
        "J": "purple.png",
        "I": "cyan.png",
        "T": "green.png",
        "O": "red.png",
        """
        self.image_dict["L"] = \
            pygame.image.load("img/" + BlockType.images.get("L"))
        self.image_dict["S"] = \
            pygame.image.load("img/" + BlockType.images.get("S"))
        self.image_dict["Z"] = \
            pygame.image.load("img/" + BlockType.images.get("Z"))
        self.image_dict["J"] = \
            pygame.image.load("img/" + BlockType.images.get("J"))
        self.image_dict["I"] = \
            pygame.image.load("img/" + BlockType.images.get("I"))
        self.image_dict["T"] = \
            pygame.image.load("img/" + BlockType.images.get("T"))
        self.image_dict["O"] = \
            pygame.image.load("img/" + BlockType.images.get("O"))